<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试语句区域</title>
    <style>
        button{
            cursor: pointer;
        }
        h1{
            text-align: center;
        }
        .test1{
            width: 400px;
            height: 400px;
            background-color: #d9d9d9d0;
            border-radius: 10px;
            margin: 100px auto;
            z-index: 10;
            display: none;
            text-align: center;
        }
        .test2{
            width: 400px;
            height: 400px;
            background-color: #d9d9d9d0;
            border-radius: 10px;
            margin: 100px auto;
            z-index: 10;
            display: none;
            text-align: center;
        }
        .test3{
            width: 400px;
            height: 400px;
            background-color: #d9d9d9d0;
            border-radius: 10px;
            margin: 100px auto;
            z-index: 10;
            display: none;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="control">
        <button  onclick="fc1()">添加功能</button>
        <button  onclick="fc2()">删除功能</button>
        <button  onclick="fc3()">修改功能</button>
    </div>
    <div class="test1">
        <h1>添加功能实现</h1>
        <form action="insert.php" method="post">
            <input type="number" name="id" placeholder="请输入编号" required></input>
            <br>
            <input type="text" name="name" placeholder="请输入姓名"  required>
            <br>
            <input type="email" name="email" placeholder="请输入邮箱"  required>
            <br>
            <input type="tel" name="tell" placeholder="请输入电话"  required></input>
            <br>
            <textarea placeholder="请输入备注" name="content"  required></textarea>
            <br>
            <input type="date" name="date"   required />
            <br>
            <input type="submit" value="提交"/>
            </input>
            </input>
        </form>
    </div>
    <div class="test2">
        <h1>删除功能实现</h1>
        <form action="delete.php" method="get">
            <input type="number" name="id" placeholder="请输入你要删除数据的编号" required></input>
            <input type="submit" value="提交"/>
            </input>
            </input>
        </form>
    </div>
    <div class="test3">
        <h1>修改功能实现</h1>
        <form action="update.php" method="post">
            <input type="number" name="id" placeholder="请输入编号" required></input>
            <br>
            <input type="text" name="name" placeholder="请输入姓名"  required>
            <br>
            <input type="email" name="email" placeholder="请输入邮箱"  required>
            <br>
            <input type="tel" name="tell" placeholder="请输入电话"  required></input>
            <br>
            <textarea placeholder="请输入备注" name="content"  required></textarea>
            <br>
            <input type="date" name="date"   required />
            <br>
            <input type="submit" value="提交"/>
            </input>
            </input>
        </form>
    </div>
    <script>
        let test1 = document.querySelector('.test1');
        let test2 = document.querySelector('.test2');
        let test3 = document.querySelector('.test3');

        function fc1(){
            test1.style.display = test1.style.display === 'block' ? 'none' : 'block';
        }
        function fc2(){
            test2.style.display = test2.style.display === 'block' ? 'none' : 'block';
        }
        function fc3(){
            test3.style.display = test3.style.display === 'block' ? 'none' : 'block';
        }
    </script>
</body>
</html>